<script type='text/javascript' src='{$base_dir}modules/dept_pharmacy/js/AJAX_EwhExportDrugMaterial.js'></script>

<script type='text/javascript'>
{literal}   
$(document).ready(function () {
	
    
});
{/literal}
</script>

<div id='ewhExport'>
<div class='documentListHeader'><span> {translate}Request ticket{/translate} </span>
</div>
<div class="form_container" style="height: 50px;">
<input id="reqTicketIdHidden" value="{$reqExpTicketInfo.pha_req_exticket_id}" type="hidden">
<table cellspacing="0" cellpadding="0" style='width: 100%;'>
        <tr>
                    <td class="label" width="150px">{translate}Request ID{/translate}</td>
                    <td class="label" width="150px">{translate}Issued date{/translate}</td>                              
                    <td class="label" width="150px">{translate}Req from{/translate}</td>
                    <td class="label" width="150px">{translate}Issued by{/translate}</td>                                                                
                    <td class="label" width="150px">{translate}Note{/translate}</td>
        </tr>
        <tr><td >{$reqExpTicketInfo.req_exticket_code}</td>
            <td >{$reqExpTicketInfo.req_date_formatted}</td>
            <td >{$reqExpTicketInfo.source_name}</td>
            <td >{$reqExpTicketInfo.source_user_name}</td>
            <td >{$reqExpTicketInfo.note}&nbsp;</td>            
        </tr>                    
</table>       
</div>
<br>
<div class='documentListHeader'>
{if $exTicketInfo.enum_status == $acceptedStatus} 
<span> {translate}Approved export ticket{/translate} </span>
{else}
<span> {translate}Rejected information{/translate} </span>
{/if}
</div>
<div  class="form_container" style="float: none; ">
   <span id='statusMessageExTicket' style="font-style:italic; color: red;">&nbsp;</span>
   <br>
    <table cellspacing="0" cellpadding="0" style='width: 100%;'>
        <tr>
                    <td class="label" width="150px">{translate}Export ID{/translate}</td>
                    <td class="label" width="150px">{translate}Issued date{/translate}</td>                              
                    <td class="label" width="150px">{translate}Export from{/translate}</td>
                    <td class="label" width="150px">{translate}Issued by{/translate}</td>                                                                
                    <td class="label" width="150px">{translate}Note{/translate}</td>
        </tr>
        <tr>
            <td>
                <span id="expTicketCodeText">{$exTicketInfo.exticket_code}</span>
                <input id="expTicketIdHidden" value="{$exTicketInfo.pha_ewh_exticket_id}" type="hidden">
            </td>
             <td class="form_input">
                {$exTicketInfo.app_date_formatted}
                <br /><span class="label" style="width: 21px; color: #AAA;">({$datePart_0}-{$datePart_1}-{$datePart_2})</span>
            </td>
            <td >{$exportSourceName}</td>
            <td >{$exTicketInfo.app_user_name}</td>
            <td >{$exTicketInfo.note}&nbsp;</td>            
        </tr>                    
    </table>    
    
</div>
<div style="margin-top: 10px; width: 100%;" class="lab_grid">
<div class="h_div">
<table cellspacing="0" cellpadding="0">
    <thead>
        <tr>
            <th style="width: 30px;">{translate}Order number{/translate}</th>
            <th style="width: 200px;">{translate}Name{/translate}</th>            
            <th style="width: 100px;">{translate}Request Qty{/translate}</th>
            <th style="width: 80px;">{translate}Unit{/translate}</th>
            <th style="width: 100px;">{translate}Req Note{/translate}</th>
            {if $exTicketInfo.enum_status == $acceptedStatus}
	            <th style="width: 100px;">{translate}Approve Qty{/translate}</th>            
	            <th style="border-right: none;" class="last">{translate}Note{/translate}</th>  
			{/if}
                                  
        </tr>
    </thead>
</table>
</div>
<div class="b_div" style="height: 250px; border-top: 1px solid #DDDDDD;" >
<form id="pickedDrugMaterialForm">
<table id="drugMaterialTable" cellspacing="0" cellpadding="0" border="0" >
    <tbody>  
        {assign var="count" value=1}
        {foreach from=$arrReqExpTicketDetailInfo item=item}
	     <tr >
            <td style="width: 30px;">{$count++}</td>
            <td style="width: 200px;"><div style="width: 200px;white-space: normal;">{$item.proprietary_name}</div></td>
            <td style="width: 100px;"><div style="width: 100px;white-space: normal;">{$item.quantity_formatted}</div></td>
            <td style="width: 80px;"><div style="width: 80px;white-space: normal;">{$item.enum_unit_import_sell_text}</div></td>
            <td style="width: 100px;"><div style="width: 100px;white-space: normal;">{$item.note}</div></td>
            {if $exTicketInfo.enum_status == $acceptedStatus}
                <td style="width: 100px;"><div style="width: 100px;white-space: normal;">{$item.approve_quantity_formatted}</div></td>            
	            <td style="border-right: none;"><div style="width: 100px;white-space: normal;">{$item.app_note}</div></td>
            {/if}
        </tr>
        {/foreach}  
    </tbody>
</table>
</form>
</div>
</div>
</div>

<div id="pickDrugMaterialDialog" style="display: none;"></div>
<div id="phaEwhReqExpLoaderDiv"
	style="display: none; position: fixed; top: 0px; left: 0px; height: 100%; width: 100%; z-index: 1000">
<div
	style="overflow: hidden; background-color: #000; position: absolute; top: 0px; left: 0px; height: 100%; width: 100%; opacity: 0.2;">
</div>
<div
	style='padding: 6px 0px 0px 6px; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; background: #F5F5F5; border: 3px solid #CCC; margin-left: -20px; margin-top: -30px;'>
<img src="{$base_uri}/images/ajax-loader.gif" /></div>
</div>